//
//  MineTableViewCell.m
//  WuJieLive
//
//  Created by 张瀚坤 on 2017/10/24.
//  Copyright © 2017年 zhk. All rights reserved.
//

#import "MineTableViewCell.h"

@implementation MineTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self setupView];
    }
    return self;
}

- (void)setupView
{
    self.leftImage = [[UIImageView alloc]init];
    [self.contentView addSubview:self.leftImage];
    [self.leftImage mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.offset(15);
        make.centerY.equalTo(self.contentView);
        make.size.mas_offset(CGSizeMake(17, 16));
    }];
    
    self.label = [[UILabel alloc]init];
    [self.contentView addSubview:self.label];
    self.label.font = FontSize(14);
    self.label.textColor = TextAssistColor;
    [self.label mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.leftImage.mas_right).offset(10);
        make.centerY.equalTo(self.contentView);
    }];
    
    
    self.rightView = [[UIImageView alloc]init];
    [self.contentView addSubview:self.rightView];
    [self.rightView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.offset(-20);
        make.centerY.equalTo(self.contentView);
        make.size.mas_offset(CGSizeMake(10, 13));
    }];
    self.rightView.image = Image(@"icon_close");
    
    
    self.rightLabel = [[UILabel alloc]init];
    [self.contentView addSubview:self.rightLabel];
    self.rightLabel.font = FontSize(14);
    [self.rightLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.rightView.mas_left).offset(-15);
        make.centerY.equalTo(self.contentView);
    }];
    self.rightLabel.hidden = YES;
    self.rightLabel.textColor = TextLessImportColor;
    
}

@end
